﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected override void OnPreRender(EventArgs e)
    {
        BLL.Tracks forRep = new BLL.Tracks();

        TrackList.DataSource = forRep.GetTracks();
        TrackList.DataBind();

        if (TrackListDataPager.TotalRowCount <= TrackListDataPager.MaximumRows)
            TrackListDataPager.Visible = false;

        if (TrackListDataPager.TotalRowCount == 0)
            AboutNullMess.Text = "список пуст!";
    }
}
